class Person:
    pass

class Teacher(Person):
    pass

class Student(Person):
    pass

class Worker(Person):
    pass

class PersonFactory:
    @staticmethod
    def create_person(person_type):
        if person_type == 't':
            return Teacher()
        elif person_type =='s':
            return Student()
        elif person_type == 'w':
            return Worker()
        else:
            return None
        
if __name__ == '__main__':
    # test
    teacher = PersonFactory.create_person('t')
    print(teacher)

    student = PersonFactory.create_person('s')
    print(student)

    worker = PersonFactory.create_person('w')
    print(worker)

    person = PersonFactory.create_person('x')
    print(person)